package com.mspbots.web.trigger.model;

import com.fasterxml.jackson.databind.JsonNode;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.Transient;
import org.springframework.data.relational.core.mapping.Table;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author billb
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Table("tenant_time_entry")
public class TimeEntry implements Serializable {

    @Id
    private Long id;
    private Long tenantId;
    private Long cwUid;
    private Long cwTid;
    private LocalDateTime beginDate;
    private LocalDateTime endDate;
    private Double actualHours;
    private String description;
    private String updatedBy;
    private Long chargeToId;
    private Boolean resolutionFlag;

    private String workTypeName;
    private Integer workTypeId;

    private JsonNode extend;

    private LocalDateTime enteredDate;
    private LocalDateTime updateTime;
    private LocalDateTime syncTime;

    @Transient
    private transient String action;

}
